export default {
    name: "i-data",
    data() {
        return {
            loading: false,
            data: {
                element: []
            },
            ruleValidate: {
                code: [{required: true, message: "海关代码必须填写"}, {len: 10, message: "海关代码固定10位字符"}],
                name: [{required: true, message: "海关名称必须填写"}],
                unit1: [{required: true, message: "海关名称必须填写"}, {len: 3, message: "海关名称必须填写"}],
                unit2: [{len: 3, message: "海关名称必须填写"}],
                element: [{required: true, message: "申报要素必须填写"}],
            }
        }
    },
    methods: {
        handleAdd() {
            this.data.element.push('');
        },
        handleRemove(index) {
            this.data.element.splice(index, 1)
        }
    }
}
